<?php

ini_set('display_errors', 'Off');
// 加载启动文件
require_once __DIR__ . '/core/bootstrap.php';

// 处理请求路径
$request = $_SERVER['PATH_INFO'] ? $_SERVER['PATH_INFO'] : (isset($_GET['r']) ? $_GET['r'] : '/');
$pos = strpos($request, '.');

// 取出路径
$path = false == $pos ? $request : strstr($request, '.', true);
$path = trim(urldecode($path), '/');

// 取出结尾
$suffix = false == $pos ? '/' : substr($request, $pos);
define('SUFFIX', $suffix);

// 运行程序
(new \sc\App())->run($path);
